package cn.fancy.sdk.pay.entity;

import org.json.JSONException;
import org.json.JSONObject;

import cn.fancy.sdk.entity.JsonParseInterface;

public class ChargeResp implements JsonParseInterface{
	 private final String _orderId = "a";   
	 private final String _alipayConfigStr = "b";
	 private final String _tenpayToken = "c";
	 private final String _tenpayReqStr = "d";
	 private final String _weixinPayInfo = "e";
	 private final String _unionPayTn = "f";
	 private final String _yeePayCardPaystr = "g";
	 private final String _yeeFastPayStr="h";
	/**
	 * 订单号
	 */
	private String orderId;
	/**
	 * 支付宝需要的配置
	 */
	private String alipayConfigStr;
	/**
	 * 财富通支付需要的tokenid
	 */
	private String tenpayToken;
	/**
	 * 财富通支付需要的商户号
	 */
	private String tenpayReqStr;
	
	/**
	 * 微信支付需要的信息
	 */
	private String weixinPayInfo;
	/**
	 * 银联支付需要的交易流水号
	 */
	private String unionPayTn;
	
	/**
	 * 易宝点卡支付需要的请求内容
	 */
	private String yeePayCardPaystr;
	
	/**
	 * 易宝快捷支付需要的请求内容
	 */
	private String yeeFastPayStr;
	

	public String getOrderId() {
		return orderId;
	}

	public String getAlipayConfigStr() {
		return alipayConfigStr;
	}

	public String getTenpayToken() {
		return tenpayToken;
	}

	public String getTenpayReqStr() {
		return tenpayReqStr;
	}

	public String getWeixinPayInfo() {
		return weixinPayInfo;
	}

	public String getUnionPayTn() {
		return unionPayTn;
	}

	public String getYeePayCardPaystr() {
		return yeePayCardPaystr;
	}
	

	public String getYeeFastPayStr() {
		return yeeFastPayStr;
	}

	@Override
	public JSONObject buildJson() {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public void parseJson(JSONObject json) {
		// TODO Auto-generated method stub
		if (json == null)
			return ;
		try {
			orderId = json.isNull(_orderId) ? "" : json.getString(_orderId);
			alipayConfigStr = json.isNull(_alipayConfigStr) ? null : json.getString(_alipayConfigStr);
			tenpayToken = json.isNull(_tenpayToken) ? null : json.getString(_tenpayToken);
			tenpayReqStr = json.isNull(_tenpayReqStr) ? null : json.getString(_tenpayReqStr);
			weixinPayInfo = json.isNull(_weixinPayInfo) ? null : json.getString(_weixinPayInfo);
			unionPayTn = json.isNull(_unionPayTn) ? null : json.getString(_unionPayTn);
			yeePayCardPaystr = json.isNull(_yeePayCardPaystr) ? null : json.getString(_yeePayCardPaystr);
			yeeFastPayStr = json.isNull(_yeeFastPayStr) ? null : json.getString(_yeeFastPayStr);
		} catch (JSONException e) {
			e.printStackTrace();
		}
	}

	@Override
	public String getShortName() {
		// TODO Auto-generated method stub
		return "ChargeResp";
	}

}
